package com.star.sync.elasticsearch.service;

import com.star.sync.elasticsearch.model.User;
import com.star.sync.elasticsearch.model.UserVo;

import java.io.IOException;
import java.util.List;

/**
 * @author: zhoujunming
 * @Description: TODO
 * @date: 2023/1/10 16:54
 * @email: zhoujunming@bluemoon.com.cn
 */

public interface UserService {
    void insert(User user);


    List<User> searchTerm(String key, String value) throws IOException;

    List<User> searchName(String name);

    List<User> searchDTerm(String key,String value)throws IOException;

    List<User> searchPageDB(Integer pageSize,Integer pageNo);

    List<User> searchPageES(Integer pageSize,Integer pageNo) throws IOException;

    User searchDetailDB(Integer id);

    int searchCountDB();

    Long searchCountES() throws IOException;

    List<User> searchGroupDB();

    List<UserVo> searchGroupES() throws IOException;

    List<User> searchPageScrollES(Integer pageSize,Integer pageNo) throws IOException;
}
